import java.util.Scanner;
public class gaijin {
		public static void main(String[] args) {
		System.out.println("输入，每次输入一个数据后回车");
		System.out.println("最后一个数据加“#”" + "结束");
		Scanner reader = new Scanner(System.in);
		    while (!reader.hasNext("#")) {
				if (reader.hasNextInt()) {
					int t1 = reader.nextInt();
					if (reader.hasNextInt()) {
						int t2 = reader.nextInt();
						int t3 = t1 + t2;
						System.out.println("整数和整数相加：" + "sum=" + t3);
					} else if (reader.hasNextFloat()) {
						float t6 = reader.nextFloat();
						float t7 = t1 + t6;
						System.out.println("整数和小数相加：" + "sum=" + t7);
					} else {
						String t4 = reader.next();
						String t5 = t1 + t4;
						System.out.println("整数和字符串相加：" + "sum=" + t5);
					}

				}

				else if (reader.hasNextFloat()) {
					float f1 = reader.nextFloat();
					if (reader.hasNextInt()) {
						int f6 = reader.nextInt();
						float f7 = f1 + f6;
						System.out.println("小数和整数相加：" + "sum=" + f7);
					} else if (reader.hasNextFloat()) {
						float f2 = reader.nextFloat();
						float f3 = f1 + f2;
						System.out.println("小数和小数相加：" + "sum=" + f3);
					} else {
						String f4 = reader.next();
						String f5 = f1 + f4;
						System.out.println("小数和字符串相加：" + "sum=" + f5);
					}
				}

				else if (reader.hasNext()) {

					String str1 = reader.next();
					if (reader.hasNextInt()) {
						int str4 = reader.nextInt();
						System.out.println("字符串和整数相加：" + "sum=" + str1 + str4);
					} else if (reader.hasNextFloat()) {
						float str5 = reader.nextFloat();
						System.out.println("字符串和小数相加：" + "sum=" + str1 + str5);
					} else {
						String str2 = reader.next();
						String str3 = str1 + str2;
						System.out.println("字符串和字符串相加：" + "sum=" + str3);
					}
				}

			}
		}

	}

